/**
 * 
 */
package net.phoenix.repository;

/**
 * A JCR name is an ordered pair of strings: (N, L) where N is a JCR namespace
 * and L is a JCR local name.
 * 
 * A qualified name is only interpretable in the context of a namespace mapping,
 * which provides a one-to-one mapping between prefixes and namespaces. When a
 * qualified name Q is passed to a JCR method within the scope of the Session S
 * then the JCR name J represented by Q is (N, L) where N is the namespace
 * corresponding to P in the local namespace mapping of S. See §3.4 Namespace
 * Mapping. When a qualified name occurs in a string serialization of repository
 * content or a node type definition, the namespace mapping is either provided
 * within the serialized form (see, for example, §7 Export and §25.2 Compact
 * Node Type Definition Notation) or implied by the context of use.
 * 
 * @author lixf
 * 
 */
public interface Name {
	/**
	 * The qualified form of a JCR name is defined as: QualifiedName ::= [Prefix
	 * ':'] LocalName
	 * 
	 * @return the qualified form of a JCR name
	 */
	public String getQName();

	/**
	 * A JCR local name is a string that conforms to the grammar below.
	 * LocalName ::= ValidString – SelfOrParent 
	 * SelfOrParent ::= '.' | '..'
	 * ValidString ::= ValidChar {ValidChar} ValidChar ::= XmlChar – InvalidChar
	 * Any XmlChar except InvalidChar InvalidChar ::= '/' | ':' | '[' | ']' |
	 * '|' | '*' XmlChar ::= /* Any character that matches the Char production t
	 * http://www.w3.org/TR/xml/#NT-Char
	 * 
	 * @return local part of the name;
	 */
	public String getLocalName();
	
	/**
	 * the namespace part of the name;
	 * @return
	 */
	public String getNamespace();

}
